# 创建 类
class Person:
    # 类属性
    # name = "张三"
    # age = 18

    # 构造函数----属性数据的初始化
    def __init__(self, name, age, sex, p_height):
        # 实例属性
        self.name = name
        self.age = age
        self.sex = sex,
        self.height = p_height

    # 创建功能函数
    def show(self):
        print("姓名：%s,性别：%s,年龄：%d,身高：%.2f" % (Person.name, self.sex, self.age, self.height))

    def eat(self):
        print("吃吃吃")
        self.show()


zs = Person("男", 180)
# print(zs.name)
# print(zs.sex)
# zs.show()

ls = Person("女", 170)
ls.name = "李四"
print(ls.name)
print(zs.name)
